<?php 
session_start();
$userid=null;
if (isset($_SESSION["userid"])==false || $_SESSION["userid"]==null) {
	header("Location: index.php");
	exit;
} else {
	$userid = $_SESSION["userid"];
}
require("dbinit.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="./js/jquery-1.3.2.min.js"></script>
<link rel="Shortcut Icon" type="image/png" href="./img/icon/logo-blue-16x16.png" />
<style type="text/css">
	/*   Common */
	* {
		font-family: "Arial";
		font-size: 11px;
	}
	body { margin: 0em; padding: 0em;}
	form input
	{
    Border:1px solid;
    Padding : 1px;
    Margin : 1px;
    Background-color : transparent;
	}	
	/*   Header Bar */
	#header_bar {
		font-family: "Arial";
		font-size: 15px;
		color: #FFFFFF;
		background-color: #187FFF;
		width: 95%;
		height: 25px;
		border-bottom: 1px solid #03426A;
		border-right: 1px solid #03426A;
		border-left: 1px solid #03426A;
	}
	/*   menu */
	.menu {font-family: arial, sans-serif; width:120px; position: relative; margin:0; font-size:11px;left:30px;}
	.menu ul {padding:0; margin:0;list-style-type: none;}
	.menu ul li {float:left; position:relative; display:block; text-decoration:none; color:#FFFFFF; font-size:11px; padding-top:4px; cursor: pointer;vertical-align:middle;}
	.menu_type {background-color: #3E97D1 ; border-top: 1px solid #03426A; width:90px; padding-left:24px; height:18px; }
	.menu_item {display:none; background-color: #65A6D1 ; border-top: 1px solid #CCCCCC; width:110px; padding-left:4px;}	

   /*       head    */
   a.headBtn:link {background-color: #65A6D1; cursor:pointer; text-decoration: none; color: #FFFFFF;}
   a.headBtn:visited {background-color: #65A6D1; cursor:pointer; text-decoration: none; color: #FFFFFF;}
   a.headBtn:hover {background-color: #03426A; cursor:pointer; text-decoration: none; color: #FFFFFF;}
   .headBtn img {border: 0px;}
</style>
<script language="javascript">
$(function() {
	$(".menu_item").hide();
	$(".menu_type").click(function(){
		$(".menu_item").hide();
		$("." + $(this).attr("id")).toggle();
	});
	$(".menu_item").mouseover(function() {
		$(this).css("background-color","#0A67A3");
	});
	$(".menu_item").mouseout(function() {
		if ($(this).attr("id") != $("#MenuSelectItem").attr("value")) {
			$(this).css("background-color","#65A6D1");
		}
	});
	$(".menu_item").click(function() {
		//alert($(this).attr("id"));
		$("#MenuSelectItem").attr("value",$(this).attr("id"));
		$(".menu_item").css("background-color","#65A6D1");
		$(this).css("background-color","#0A67A3");
	});
	$(".menu_type_refresh").click(function(){
		thisObjectID = $(this).attr("id");
		$("."  + thisObjectID).remove();
		$.post("menu.php",
				{typeID:thisObjectID},
				function(data){
					$("#" + thisObjectID).after(data);
				}
				);
	});
});

function btn_newatour_click(){
	$("#frm_main").attr("src","main_new_tour_page.php");
}

function btn_editTour_click(indexTour) {
	$("#frm_main").attr("src","main_edit_tour_page.php?indexTour=" + indexTour);
}

function btn_logout_click() {
	$.post("logout.php",{
	}, function(data){
		 window.location.reload();
	});
}

</script>

<title>but :: build your trip</title>
</head>
<body>

	<table width="100%" height="100%" cellpadding="0" cellspacing="0">
		<tr><td colspan="2" height="43px" align="center" valign="top">
			<div id="header_bar"><table width="100%"><tr>
					<td width="23%" align="left" valign="middle" style="font-family: 'Arial black'; font-size:14px; color: #FFFFFF; padding-left: 15px;">build your trip</td>
					<td width="43%" align="left" valign="bottom" style="font-family: 'Arial'; font-size:12px; color: #FFFFFF;"> <a class="headBtn" href="main.php"><img src="./img/icon/status_online.png" />管理</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class="headBtn"><img src="./img/icon/feed_ballon.png" />訂閱</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class="headBtn" href="main_search.php"><img src="./img/icon/find.png" />尋找</a></td>
					<td width="33%" align="right" valign="middle" style="font-family: 'Arial'; font-size:12px; color: #CCCCCC; padding-right: 10px;">(James Cheng) 登出 </td></tr></table></div>
		</td></tr>
		<tr><td width="150px" valign="top" style="padding-left:10px; padding-right:10px; border-right: #03426A 2px dotted;">


				<div class="menu">
				<input type="hidden" id="MenuSelectItem" name="MenuSelectItem" value="0" />
				<ul>
					<li class="menu_type" id="btn_newatour" style="background-image: url('./img/icon/new.png'); background-repeat: no-repeat;" onclick="btn_newatour_click();"><a>新增</a></li>
					<li class="menu_type menu_type_refresh" id="in_process" style="background-image: url('./img/icon/direction.png'); background-repeat: no-repeat;"><a>計畫中</a></li>

					<li class="menu_type menu_type_refresh" id="share" style="background-image: url('./img/icon/user_silhouette.png'); background-repeat: no-repeat;"><a>分享編輯</a></li>

					<li class="menu_type menu_type_refresh" id="public" style="background-image: url('./img/icon/book_open.png'); background-repeat: no-repeat;"><a>公開閱覽</a></li>

					<li class="menu_type menu_type_refresh" id="history" style="background-image: url('./img/icon/databases.png'); background-repeat: no-repeat;"><a>存封</a></li>

					<li class="menu_type" id="btn_logout" style="background-image: url('./img/icon/application_go.png'); background-repeat: no-repeat;" onclick="btn_logout_click();"><a>登出</a></li>
				</ul>
				</div>

		</td>
			<td align="left" valign="top" style="padding-left:10px;">
				<form>
					Keyword:<input type="text" /><br />
					Location:<select>
					<option>亞洲</option>
					<option>－北亞</option>
					<option>－－俄羅斯</option>
					<option>－－韓國</option>
					<option>－－日本</option>
					<option>－東亞</option>
					<option>－－台灣</option>
					<option>－－中國</option>
					<option>－東南亞</option>
					<option>－－香港</option>
					<option>－－澳門</option>
					<option>－－菲律賓</option>
					<option>－－馬來西亞</option>
					<option>－－新加坡</option>
					<option>－－印尼</option>
					<option>－－泰國</option>
					<option>－－越南</option>
					<option>－－寮國</option>
					<option>－－汶萊</option>
					<option>－南亞</option>
					<option>－－尼泊爾</option>
					<option>－－印度</option>
					<option>－－巴基斯坦</option>
					<option>－中亞</option>
					<option>美洲</option>
					<option>－北美洲</option>
					<option>－－加拿大</option>
					<option>－－美國</option>
					<option>－中南美洲</option>
					<option>－－墨西哥</option>
					<option>－－古巴</option>
					<option>－－巴拿馬</option>
					<option>－－阿根廷</option>
					<option>－－智利</option>
					<option>歐洲</option>
					<option>－西歐</option>
					<option>－－英國</option>
					<option>－－法國</option>
					<option>－南歐</option>
					<option>－－西班牙</option>
					<option>－－葡萄牙</option>
					<option>－－義大利</option>
					<option>－－希臘</option>
					<option>－北歐</option>
					<option>－－挪威</option>
					<option>－－瑞典</option>
					<option>－東歐</option>
					<option>－中歐</option>
					<option>－－德國</option>
					<option>大洋洲</option>
					<option>－島國</option>
					<option>－－關島</option>
					<option>－澳洲</option>
					<option>－－澳洲</option>
					<option>－－紐西蘭</option>
					<option>非洲</option>
					<option>－南非</option>
					<option>－北非</option>
					<option>－西非</option>
					<option>－東非</option>
					<option>－中非</option>
					</select><br />
					Date:<input type="text" /> ~ <input type="text" /><br />
					<input type="submit" /> 
				</form>
			</td>
			</tr>
		<tr><td colspan="2" height="20px" align="center" style="border-top: #03426A 1px solid;">Copyright © 2009 www.but.com. Designed by James Cheng</td></tr>
	</table>

</body></html>
<?php	mysql_close($link);
?>